<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src = "../Class6/jquery.min.js"></script>
</head>
<body>
    <script>
        $(function(){
            //获取第一个元素
            $('ul li:first').css('color', 'red');

            //获取指定索引元素
            $('ul li:eq(1)').css('color', 'gold');

            //获取最后一个元素
            $('ul li:last').css('color', 'skyblue')
        })
    </script>

    <ul>
        <li>测试内容1</li>
        <li>测试内容2</li>
        <li>测试内容3</li>
    </ul>
</body>
</html>